package com.ruoyi.web.controller.school;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.school.domain.PacAcademicOutput;
import com.ruoyi.school.domain.PacClass;
import com.ruoyi.school.domain.PacTeacher;
import com.ruoyi.school.domain.vo.AcademicCommonVo;
import com.ruoyi.school.domain.vo.PacAcademicOutputVo;
import com.ruoyi.school.service.AcademicOutputService;
import com.ruoyi.school.service.PacTeacherService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/school/teacher")
public class PacTeacherController extends BaseController {
    @Resource
    private PacTeacherService pacTeacherService;

    /**
     * 获得我的老师信息
     */
    @GetMapping("/myTeacher")
    public AjaxResult myTeacher(PacTeacher pacTeacher) {
        SysUser user = pacTeacherService.getMyTeacherInfo();
        return success(user);
    }

    /**
     * 获得我的老师信息
     */
    @GetMapping("/stuAllTeacher")
    public AjaxResult stuAllTeacher(PacTeacher pacTeacher) {
        Integer stuId = pacTeacher.getId();
        List<PacTeacher> teachers = pacTeacherService.getStuAllTeacher(stuId);
        return success(teachers);
    }
}
